import QtQuick 2.0

import "../../common"
import "../../../js/util.js" as Util
import "../../../js/UI.js" as Style

Page{
    id: showlist

    ATitle{
        id: m_titleID
        anchors.top: parent.top
        anchors.left: parent.left
        m_text: qsTr("化学实验室")
        m_textcol: Style.fonttilteColor
        onBackSignal:subpageSignal(1,-1)
    }

    ListModel{
        id: m_lab
        ListElement{
            splace:  "A205"
            state: "空闲"
        }
        ListElement{
            splace: "A206"
            state: "上课"
        }
        ListElement{
            splace: "A207"
            state: "空闲"
        }
        ListElement{
            splace:  "A208"
            state: "空闲"
        }
        ListElement{
            splace:  "A209"
            state: "上课"
        }
    }

    ListView{
        id: listview
        anchors.top: m_titleID.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        width: parent.width
        height: parent.height - m_titleID.height
        clip: true
        model: m_lab
        delegate: Rectangle{
            height: m_lineValue
            width: parent.width
            AText {
                anchors.left: parent.left
                anchors.leftMargin: m_lineValue*0.2
                anchors.verticalCenter: parent.verticalCenter
                text: model.splace
                font.pointSize: Style.fontlittlcontent
                color:Style.fonttilteColor
            }
            AText {
                anchors.right: parent.right
                anchors.rightMargin: m_lineValue*0.2
                anchors.verticalCenter: parent.verticalCenter
                text: model.state
                font.pointSize: Style.fontlittlcontent
                color:Style.fonttilteColor
            }
            SplitLine {
                anchors {
                    bottom: parent.bottom
                    left: parent.left
                    right: parent.right;
                }
            }
        }
    }
}
